Optimal. Leaf size=45 \[ -\frac{a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac{\tan (c+d x) (a \sec (c+d x)+2 a)}{2 d}-a x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0339243, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {3881, 3770} \[ -\frac{a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac{\tan (c+d x) (a \sec (c+d x)+2 a)}{2 d}-a x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3881
Rule 3770
Rubi steps
\begin{align*} \int (a+a \sec (c+d x)) \tan ^2(c+d x) \, dx &=\frac{(2 a+a \sec (c+d x)) \tan (c+d x)}{2 d}-\frac{1}{2} \int (2 a+a \sec (c+d x)) \, dx\\ &=-a x+\frac{(2 a+a \sec (c+d x)) \tan (c+d x)}{2 d}-\frac{1}{2} a \int \sec (c+d x) \, dx\\ &=-a x-\frac{a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac{(2 a+a \sec (c+d x)) \tan (c+d x)}{2 d}\\ \end{align*}
Mathematica [A] time = 0.0293039, size = 60, normalized size = 1.33 \[ -\frac{a \tan ^{-1}(\tan (c+d x))}{d}+\frac{a \tan (c+d x)}{d}-\frac{a \tanh ^{-1}(\sin (c+d x))}{2 d}+\frac{a \tan (c+d x) \sec (c+d x)}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.032, size = 78, normalized size = 1.7 \begin{align*} -ax+{\frac{a\tan \left ( dx+c \right ) }{d}}-{\frac{ac}{d}}+{\frac{a \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{2\,d \left ( \cos \left ( dx+c \right ) \right ) ^{2}}}+{\frac{a\sin \left ( dx+c \right ) }{2\,d}}-{\frac{a\ln \left ( \sec \left ( dx+c \right ) +\tan \left ( dx+c \right ) \right ) }{2\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.72673, size = 88, normalized size = 1.96 \begin{align*} -\frac{4 \,{\left (d x + c - \tan \left (d x + c\right )\right )} a + a{\left (\frac{2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} + \log \left (\sin \left (d x + c\right ) + 1\right ) - \log \left (\sin \left (d x + c\right ) - 1\right )\right )}}{4 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 0.904682, size = 234, normalized size = 5.2 \begin{align*} -\frac{4 \, a d x \cos \left (d x + c\right )^{2} + a \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - a \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \,{\left (2 \, a \cos \left (d x + c\right ) + a\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} a \left (\int \tan ^{2}{\left (c + d x \right )} \sec{\left (c + d x \right )}\, dx + \int \tan ^{2}{\left (c + d x \right )}\, dx\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.75812, size = 119, normalized size = 2.64 \begin{align*} -\frac{2 \,{\left (d x + c\right )} a + a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right ) - a \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right ) + \frac{2 \,{\left (a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - 3 \, a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1\right )}^{2}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]